package kr.co.doriclassic.chpater22test;

class Box<T> {
	private T data;

	public Box(T data) {
		this.data = data;
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}
	
	
}

public class BoxTest{
	public static void main(String[] args) {
		Box<String> b1 = new Box<String>("Test");
		Box<Integer> b2 = new Box<Integer>(3);
		
		b1.setData("Java");
		
		System.out.println(b1.getData());
		
	}
}
